package com.ihealthway.all.groupbuy.vo;

import io.github.elkan1788.mpsdk4j.vo.MPAccount;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Table;

import java.util.Date;

/**
 * Bean class for MPSetting design
 *
 * @author 凡梦星尘(elkan1788@gmail.com)
 */
@Table("gb_mp_setting")
public class MPSetting {

    @Name
    @Column("mp_id")
    private String mpId;
    @Column("nick_name")
    private String nickName;
    @Column("app_id")
    private String appId;
    @Column("app_secret")
    private String appSecret;
    @Column("dev_token")
    private String devToken;
    @Column("aes_key")
    private String aesKey;
    @Column("access_token")
    private String accessToken;
    @Column("at_expire_time")
    private Long atExpireTime;
    @Column("js_ticket")
    private String jsTicket;
    @Column("jt_expire_time")
    private Long jtExpireTime;
    @Column("mch_id")
    private String mchId;
    @Column("mch_key")
    private String mchKey;
    @Column("cert_path")
    private String certPath;
    @Column("cert_pswd")
    private String certPswd;
    @Column("welcome")
    private String welcome;
    @Column("remarks")
    private String remarks;
    @Column("create_time")
    private Date createTime;
    @Column("update_time")
    private Date updateTime;
    @Column("data_status")
    private String dataStatus;

    public String getMpId() {
        return mpId;
    }

    public void setMpId(String mpId) {
        this.mpId = mpId;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public String getDevToken() {
        return devToken;
    }

    public void setDevToken(String devToken) {
        this.devToken = devToken;
    }

    public String getAesKey() {
        return aesKey;
    }

    public void setAesKey(String aesKey) {
        this.aesKey = aesKey;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public Long getAtExpireTime() {
        return atExpireTime;
    }

    public void setAtExpireTime(Long atExpireTime) {
        this.atExpireTime = atExpireTime;
    }

    public String getJsTicket() {
        return jsTicket;
    }

    public void setJsTicket(String jsTicket) {
        this.jsTicket = jsTicket;
    }

    public Long getJtExpireTime() {
        return jtExpireTime;
    }

    public void setJtExpireTime(Long jtExpireTime) {
        this.jtExpireTime = jtExpireTime;
    }

    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public String getMchKey() {
        return mchKey;
    }

    public void setMchKey(String mchKey) {
        this.mchKey = mchKey;
    }

    public String getCertPath() {
        return certPath;
    }

    public void setCertPath(String certPath) {
        this.certPath = certPath;
    }

    public String getCertPswd() {
        return certPswd;
    }

    public void setCertPswd(String certPswd) {
        this.certPswd = certPswd;
    }

    public String getWelcome() {
        return welcome;
    }

    public void setWelcome(String welcome) {
        this.welcome = welcome;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getDataStatus() {
        return dataStatus;
    }

    public void setDataStatus(String dataStatus) {
        this.dataStatus = dataStatus;
    }

    public void cloneToMPAct(MPAccount mpAct) {
        mpAct.setMpType("S");
        mpAct.setMpId(this.mpId);
        mpAct.setAppId(this.appId);
        mpAct.setAppSecret(this.appSecret);
        mpAct.setToken(this.devToken);
        mpAct.setAESKey(this.aesKey);
    }

    @Override
    public String toString() {
        return "MPSetting{" +
                "mpId='" + mpId + '\'' +
                ", nickName='" + nickName + '\'' +
                ", appId='" + appId + '\'' +
                ", appSecret='" + appSecret + '\'' +
                ", devToken='" + devToken + '\'' +
                ", aesKey='" + aesKey + '\'' +
                ", accessToken='" + accessToken + '\'' +
                ", atExpireTime=" + atExpireTime +
                ", jsTicket='" + jsTicket + '\'' +
                ", jtExpireTime=" + jtExpireTime +
                ", mchId='" + mchId + '\'' +
                ", mchKey='" + mchKey + '\'' +
                ", certPath='" + certPath + '\'' +
                ", certPswd='" + certPswd + '\'' +
                ", welcome='" + welcome + '\'' +
                ", remarks='" + remarks + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", dataStatus=" + dataStatus +
                '}';
    }
}
